home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / B-C / C++ FAQ Reference 1.0 / C++ FAQ Reference 1.0.rsrc / TEXT_1435.txt < prev    next >
Encoding:
Text File  |  1993-06-30  |  676 b   |  5 lines

  1. No.  In fact, 'NO!' :-)
  2.  
  3. The previous questions were talking about *subobjects*, not parameters.  Pass- by-value is usually a bad idea when mixed with inheritance (larger subclass objects get 'sliced' when passed by value as a base class object).  Generally, objects that are part of an inheritance hierarchy should be passed by ref or by ptr, but not by value, since only then do you get the (desired) dynamic binding.
  4.  
  5. Unless compelling reasons are given to the contrary, subobjects should be by value and parameters should be by reference.  The discussion in the previous few questions indicates some of the 'compelling reasons' for when subobjects should be by reference.